package com.ytjj.qmyx.supplychain.common.enums;

/**
 * @ClassName BankerMessageStatusEnum
 * @Description TODO
 *
 * 
 * @Version 1.0
 **/
public enum BankerMessageStatusEnum {
    NO_READ(0,"未查看"),
    READ(1, "已查看"),
    ;

    private Integer code;
    private String message;

    BankerMessageStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessageByCode(Integer code){
        for (BankerMessageStatusEnum value : BankerMessageStatusEnum.values()) {
            if(value.getCode().equals(code)){
                return value.getMessage();
            }
        }
        return null;
    }

    public static Integer getCodeByMessage(String message){
        for (BankerMessageStatusEnum value : BankerMessageStatusEnum.values()) {
            if(value.getMessage().equals(message)){
                return value.getCode();
            }
        }
        return null;
    }
}
